﻿<UserControl x:Class="ScrumFactory.FactoryServerConfiguration.ServerConfiguration"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:props="clr-namespace:ScrumFactory.FactoryServerConfiguration.Properties"
             xmlns:SF_Helpers="clr-namespace:ScrumFactory.Windows.Helpers;assembly=ScrumFactory.Windows.Helpers"
             xmlns:SF_Comp="clr-namespace:ScrumFactory.Composition;assembly=ScrumFactory.Composition" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <TabControl Style="{StaticResource WindowTabControl}">
        <TabControl.Items>
            <TabItem Header="{x:Static props:Resources.Server_settings}">
                <SF_Helpers:PanelLayout 
                    ShowCurrentProjectName="False"
                    Title="{x:Static props:Resources.Server_settings}" Style="{StaticResource DetailPanelLayout}">
                    
                    <SF_Helpers:PanelLayout.Toolbar>                        
                            <ToolBar>
                                <MenuItem Command="{Binding ApplyCommand}" Header="{x:Static props:Resources.Apply}" >
                                    <MenuItem.Icon>
                                        <Image Source="/Images/Toolbar/checked.png" Width="32" Height="32" />
                                    </MenuItem.Icon>
                                </MenuItem>
                                <MenuItem  Header="{x:Static props:Resources.Upload_logo}" Command="{Binding UploadLogoCommand}">
                                <MenuItem.Icon>
                                    <Image Source="/Images/ToolBar/image.png" Width="32" Height="32" Stretch="Uniform"/>
                                </MenuItem.Icon>
                            </MenuItem>
                        </ToolBar>
                    </SF_Helpers:PanelLayout.Toolbar>
                    
                    <SF_Helpers:PanelLayout.Content>

                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="280"/>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="300"/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="auto"/>
                                <RowDefinition Height="auto"/>
                                <RowDefinition Height="auto"/>
                                <RowDefinition Height="auto"/>
                            </Grid.RowDefinitions>
                            
                            <TextBlock Grid.Column="0" Grid.Row="0" Style="{StaticResource LabelTextBlock}" Text="{x:Static props:Resources.DefaultCompanyName}"/>
                            <TextBox Grid.Column="1"  Grid.Row="0"  Text="{Binding Config.DefaultCompanyName}"  HorizontalAlignment="Stretch"/>

                            <TextBlock Grid.Column="0" Grid.Row="1" Style="{StaticResource LabelTextBlock}" Text="{x:Static props:Resources.ScrumFactorySenderEmail}"/>
                            <TextBox Grid.Column="1"  Grid.Row="1"  Text="{Binding Config.ScrumFactorySenderEmail}"  HorizontalAlignment="Stretch" />

                            <TextBlock Grid.Column="0" Grid.Row="2" Style="{StaticResource LabelTextBlock}" Text="{x:Static props:Resources.ScrumFactorySenderName}"/>
                            <TextBox Grid.Column="1"  Grid.Row="2"  Text="{Binding Config.ScrumFactorySenderName}"  HorizontalAlignment="Stretch"/>

                            <TextBlock Grid.Column="0"  Grid.Row="3" Style="{StaticResource LabelTextBlock}" Text="{x:Static props:Resources.TrustedEmailDomains}"/>
                            <StackPanel Grid.Column="1" Grid.Row="3">
                                <TextBox Text="{Binding Config.TrustedEmailDomains}" HorizontalAlignment="Stretch"/>
                                <TextBlock Text="{x:Static props:Resources.TrustedEmailDomains_tooltip}" Style="{StaticResource LabelTextBlock}" FontSize="{StaticResource SmallFontSize}" Margin="3,-6,0,0"/>
                            </StackPanel>

                            <Image Source="{Binding ServerImageUrl}" Grid.RowSpan="4" Grid.Column="2" Margin="30" MaxHeight="100"/>
                            
                        </Grid>

                    </SF_Helpers:PanelLayout.Content>
                    
                </SF_Helpers:PanelLayout>
                
            </TabItem>
        </TabControl.Items>
    </TabControl>
</UserControl>
